home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10138 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: uu4news.netcom.com!zodiac!szh
  3. From: szh@zcon.com (Syed Zaeem Hosain)
  4. Subject: Re: given: char foo[80]; there is no such thing as element foo[80] correct? (i.e. foo[80] = '\0' is beyond the array boundary)
  5. Message-ID: <1996Mar15.183302.5364@zcon.com>
  6. Sender: szh@zcon.com (Syed Zaeem Hosain)
  7. Nntp-Posting-Host: zodiac
  8. Reply-To: szh@zcon.com
  9. Organization: Z Consulting Group
  10. References: <3148DBB6.1353@hawaii.edu>
  11. Date: Fri, 15 Mar 1996 18:33:02 GMT
  12.  
  13. In article <3148DBB6.1353@hawaii.edu>, Dave Carien <davec@hawaii.edu> writes:
  14. >Yes or no on this, I just recently got confused by two different books. I 
  15. >assume that the declaration foo[80] allocates storage for elements 0-79. 
  16. >A string could be terminated by doing something like foo[79] = '\0', but 
  17. >foo[80] = '\0' would be invalid because such an element does not exist. 
  18. >Just looking for confirmation that I'm right here. A simple Y or N will 
  19. >do thanks.
  20.  
  21. Y
  22.  
  23.  
  24. -- 
  25. -------------------------------------------------------------------------
  26. | Syed Zaeem Hosain          P. O. Box 610097            (408) 441-7021 |
  27. | Z Consulting Group        San Jose, CA 95161             szh@zcon.com |
  28. -------------------------------------------------------------------------
  29.